Skip to content

fix: core test minor fixes --skip-pipeline#1890

Merged
akshaydeo merged 1 commit intomainfrom
03-03-fix_core_test_fixes
Mar 3, 2026
Merged

fix: core test minor fixes --skip-pipeline#1890
akshaydeo merged 1 commit intomainfrom
03-03-fix_core_test_fixes

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Summary

Adds support for the new Anthropic Claude Sonnet 4 model (anthropic.claude-sonnet-4-20250514-v1:0) and adjusts prompt caching validation thresholds to be more lenient.

Changes

  • Added anthropic.claude-sonnet-4-20250514-v1:0 to the supported models list in test account configuration
  • Added the new Claude Sonnet 4 model as a fallback option in Bedrock tests for token counting
  • Reduced minimum cached tokens percentage requirement from 90% to 80% in prompt caching tests to accommodate varying caching performance across different models

Type of change

  • Bug fix
  • Feature
  • Refactor
  • Documentation
  • Chore/CI

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Providers/Integrations
  • Plugins
  • UI (Next.js)
  • Docs

How to test

Verify the new model works correctly and prompt caching tests pass with the adjusted threshold:

# Core/Transports
go version
go test ./...

# Test specifically with the new Claude Sonnet 4 model
go test ./core/providers/bedrock -v
go test ./core/internal/llmtests -v

Ensure AWS credentials are configured for Bedrock access when testing the new model.

Screenshots/Recordings

N/A

Breaking changes

  • Yes
  • No

Related issues

N/A

Security considerations

No additional security implications - uses existing AWS Bedrock authentication mechanisms.

Checklist

  • I read docs/contributing/README.md and followed the guidelines
  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)
  • I verified the CI pipeline passes locally if applicable

Copy link
Copy Markdown
Collaborator Author

Pratham-Mishra04 commented Mar 3, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from 02-26-refactor_pricing_module_refactor to graphite-base/1890 March 3, 2026 11:24
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 3, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19e606e and b122791.

📒 Files selected for processing (3)
  • core/internal/llmtests/account.go
  • core/internal/llmtests/prompt_caching.go
  • core/providers/bedrock/bedrock_test.go

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Added Claude Sonnet 4 model support to the Bedrock provider.
  • Improvements

    • Lowered prompt-caching token threshold for improved response handling and performance.
  • Tests

    • Updated Bedrock test configuration to include the new Claude Sonnet 4 fallback model.

Walkthrough

The changes add the Claude Sonnet 4 deployment to Bedrock provider test configurations and lower the prompt-caching minimum cached-tokens threshold from 90% to 80% in tests and related messages.

Changes

Cohort / File(s) Summary
Bedrock Claude Sonnet 4 Support
core/internal/llmtests/account.go, core/providers/bedrock/bedrock_test.go
Added anthropic.claude-sonnet-4-20250514-v1:0 to the Bedrock provider model lists/fallbacks in test configurations.
Prompt Caching Threshold Adjustment
core/internal/llmtests/prompt_caching.go
Lowered the minimum cached-tokens requirement for the second query from 0.90 to 0.80 and updated related log/assertion text.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nibble bugs and munch on code,

Claude Sonnet joins the test-time road,
Cache trims down to eighty percent,
Hops of joy — a tidy commit sent! 🥕

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch 03-03-fix_core_test_fixes

Comment @coderabbitai help to get the list of available commands and usage tips.

@Pratham-Mishra04 Pratham-Mishra04 force-pushed the 03-03-fix_core_test_fixes branch from 560c72b to b122791 Compare March 3, 2026 11:24
@Pratham-Mishra04 Pratham-Mishra04 changed the base branch from graphite-base/1890 to main March 3, 2026 11:24
@akshaydeo akshaydeo changed the title fix: core test minor fixes fix: core test minor fixes --skip-pipeline Mar 3, 2026
@akshaydeo akshaydeo merged commit 8543479 into main Mar 3, 2026
2 checks passed
@akshaydeo akshaydeo deleted the 03-03-fix_core_test_fixes branch March 3, 2026 11:25
loss-and-quick pushed a commit to loss-and-quick/bifrost that referenced this pull request Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants